package com.company.huisuo.base

import android.app.Activity
import androidx.viewbinding.ViewBinding
import com.lxj.xpopup.core.CenterPopupView


abstract class BaseCenterPopupView<VB : ViewBinding>(var mContext: Activity) : CenterPopupView(
    mContext
) {

    protected lateinit var mBinding: VB

    override fun getImplLayoutId(): Int {
        return getLayoutId
    }

    override fun onCreate() {
        super.onCreate()
        mBinding = getViewBinding
        initData()
    }

    override fun onShow() {
        super.onShow()
    }

    override fun onDismiss() {
        super.onDismiss()
    }

    abstract val getLayoutId: Int

    abstract val getViewBinding: VB

    abstract fun initData()
}
